﻿<!--#include virtual="/Common/Config.asp" -->
<!--#include virtual="/Common/conn.asp" -->
<!--#include virtual="/Common/Function.asp" -->
<%
If Request.ServerVariables ("Request_Method")="POST" Then

	ID_List		= reform("OP_ID")
	Sort_Type	= reform("Sort_Type")

	If ID_List="" Then 
		AlertBox "请选择要置顶的信息！","javascript:history.go(-1)"
	End If 
	
	Array_List = Split(ID_List,",")
	Conn.BeginTrans
	On Error Resume Next

	For i=0 To UBound(Array_List)
		OP_ID = Trim(Array_List(i))
		Sql = "INSERT INTO Info_Sort_Table(Info_ID,Sort_Order,Sort_Sub_ID) VALUES( "&_
			OP_ID&_
			",1000"&_
			","&Sort_Type&_
			")"
		conn.execute(Sql)
	Next 
	
	
	if err.number =0 then  
	    conn.CommitTrans  
		AlertBox "设置成功！","Spot_Query.asp"
	else 
		conn.RollbackTrans 
		AlertBox "设置失败！","Spot_Query.asp"
	end if

End If

%>
